package net.lateeye.search;

import java.util.Date;
import java.util.Locale;

public interface Result
{
	/**
	 * Returns the date on which crawler visited the most recently.
	 * 
	 * @return
	 */
	public Date getLastDateVisitedByCrawler();

	/**
	 * Returns the date on which the document was updated the most recently.
	 * 
	 * @return
	 */
	public Date getModifiedDate();

	/**
	 * Returns the date on which the document was created.
	 * 
	 * @return
	 */
	public Date getCreatedDate();

	/**
	 * Returns the unique name of this result's document.
	 * 
	 * @return
	 */
	public String getDocumentID();

	/**
	 * Returns the source of this result's document.
	 * 
	 * @return
	 */
	public String getDocumentSource();

	/**
	 * Returns the type (such as the MIME type) of this result's document.
	 * 
	 * @return
	 */
	public String getDocumentType();

	/**
	 * Returns a valid "clickable" URI to the document.
	 * 
	 * @return
	 */
	public String getDocumentURI();

	/**
	 * Returns the name and value of all fields that were returned for this
	 * result.
	 * 
	 * @param fieldName
	 * @return
	 */
	public NameValuePair[] getFields();

	/**
	 * Returns the values of fields that were returned for this result, and
	 * whose name is fieldName.
	 * 
	 * @param fieldName
	 * @return
	 */
	public String[] getFields(String fieldName);

	/**
	 * Returns the language of this result's document.
	 * 
	 * @return
	 */
	public Locale getLanguage();

	/**
	 * Returns the value inside of body tag.
	 * 
	 * @param name
	 * @return
	 */
	public String getBody();

	/**
	 * Returns the score assigned by the search engine to this result.
	 * 
	 * @return
	 */
	double getScore();

	/**
	 * Returns the title of this result's document.
	 */
	public String getTitle_Raw();
}
